home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / lord2b7.zip / CASTLE3.REF < prev    next >
Text File  |  1997-05-26  |  8KB  |  445 lines

  1. ;note to .ref masters:
  2. ;replace castle3 with something else to use this .ref for other dwellings
  3. ;this .ref uses no long term vars, instead it makes its own data file - this
  4. ;means upgrading the game will not make people 'lose ownership' of their
  5. ;stuff.
  6.  
  7. @#signhelp
  8. @do moveback
  9. @do saybar
  10. `0Sign: `2Be careful what you touch.
  11.  
  12. @#sign1
  13. @do moveback
  14. @do saybar
  15. `0Sign: `4Bonetown
  16.  
  17. @#sign2
  18. @do moveback
  19. @do saybar
  20. `0Sign: `9Porttown
  21. @#sign3
  22. @do moveback
  23. @do saybar
  24. `0Sign: `2Greentree
  25.  
  26. @#warpme
  27. @loadmap &map
  28. @drawmap
  29. @update
  30. @do quebar
  31. `%Wow, what a ride!
  32.  
  33. @#stone1
  34. ;Greentree
  35. @do x is 51
  36. @do y is 16
  37. @do map is 1356
  38. @do goto warpme
  39.  
  40. @#stone2
  41. ;Bonetown
  42. @do x is 68
  43. @do y is 5
  44. @do map is 1572
  45. @do goto warpme
  46.  
  47. @#stone3
  48. ;Porttown
  49. @do x is 62
  50. @do y is 13
  51. @do map is 956
  52. @do goto warpme
  53.  
  54.  
  55. @#TABLE
  56. ;get magic wand
  57. @do moveback
  58. @if castle3.dat exist false then do
  59.   @begin
  60.   @do saybar
  61. `0"Geeeet ouuut hoooman.." `2the table creaks.
  62.   @closescript
  63.   @end
  64.  
  65. ;load info on owner
  66. @readfile castle3.dat
  67. `p20
  68. `s01
  69. @
  70.  
  71. @if `p20 not &playernum then do
  72.   @begin
  73.   @do saybar
  74. `2What?  Touch something that isn't yours?  Um, no.
  75.   @closescript
  76.   @end
  77.  
  78. @if `i56 > 0 then do
  79.   @begin
  80.   @do saybar
  81. `2There is nothing on the table.
  82.   @closescript
  83.   @end
  84.  
  85. @do saybar
  86. A wand magically appears when you touch the table!  Yeah!
  87. @do `i56 is 1
  88.  
  89. @#FOUNTAIN
  90. ;free heal
  91. @offmap
  92. @do moveback
  93. @show
  94. `r0`c  `r1  The Fountain  `r0
  95.  
  96.   `2The strange water makes you tingle.
  97.  
  98.   `%YOU ARE COMPLETEY HEALED.
  99.  
  100. `k
  101. @do `p02 is `p03
  102. @drawmap
  103. @update
  104.  
  105.  
  106.  
  107. @#doorguard
  108. @do moveback
  109. @label startg
  110. ;guy who owns on it pushes against the door guard symbol.  This lets him
  111. ;control the password to gain entrance to the castle, as well as sell it
  112. ;back or transfer ownership.
  113. @if castle3.dat exist false then do
  114.   @begin
  115.   @do saybar
  116. `0"You must leave now, human," `2the troll commands.
  117.  @closescript
  118.   @end
  119.  
  120. @readfile castle3.dat
  121. `p20
  122. `s01
  123. @
  124. ;load owner and current password
  125.  
  126. @if `p20 not &playernum then do
  127.   @begin
  128.   @do saybar
  129. You wave to the troll, nice of it to let you in.
  130.   @closescript
  131.   @end
  132. @busy
  133.  
  134.  
  135. @do `v01 is 1 ;set default choice to 1
  136. @show
  137. `r0`c  `r1 Instructing your servants `r0
  138.  
  139.   `2The tiny troll snaps to attention when he sees you are going to
  140.   address him.
  141.  
  142. @do write
  143. `x`x
  144. @choice
  145. Set password to gain entrance (currently is `0`s01`%)
  146. Ownership options
  147. Leave
  148. @
  149. @if responce is 2 then do
  150.  @begin
  151.  @show
  152. `r0`c  `r1 Ownership Options `r0
  153.  
  154.   `2You retrieve your deed and carefully look it over.
  155.    
  156.    @do `v01 is 1
  157.    @do write
  158. `x`x
  159.    @choice
  160. Transfer deed to someone else
  161. Sell property back to the bank for `$20000`%.
  162. Do nothing of the sort
  163.  @if response is 1 then do
  164.    @begin
  165.    @show
  166. `\`\  `2Transfer to whom?
  167.    @chooseplayer `p20
  168.  
  169.    @if `p20 is 0 then do
  170.     @begin
  171.     @show
  172.   `2You decide to keep your domain - for now.`\`\`k
  173.     @do goto startg
  174.     @end
  175.    @do `s02 is getname `p20
  176.    @show
  177. `2  Are you sure you wish to give your tower to `0`s02`2?
  178. @do write
  179. `x`x
  180. @choice
  181. Yes
  182. Not on your life.
  183.  @if responce is 2 then do
  184.    @begin
  185.     @show
  186. `\`\  `2You decide to keep your domain - for now.`\`\`k
  187.     @do goto startg
  188.    @end
  189.  
  190.   @do delete castle3.dat
  191.   @writefile castle3.dat
  192. `p20
  193. `s01
  194. 0
  195. 0
  196. 0
  197. 0
  198.    @writefile mail\mail`p20.dat
  199.   `0Business note:
  200. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  201. `0  `n`2 has transferred ownership of Wizard Tower to you. 
  202.   Password to enter will remain `0"`s01"`2 unless
  203.   `2you come by and change it.
  204.  
  205.     @do addlog
  206.   `0`n`2 has given `%Wizard Tower`2 to `0`s02`2!
  207.      @routine seperate in gametxt.ref
  208.  
  209.     @show
  210. `\`\  `2Deed transfered.  Oh well - it was fun while it lasted.`\`\`k
  211.    @do goto done
  212.    @end
  213.   @if response is 2 then do
  214.     @begin
  215.     @show
  216. `\`\`2  Are you sure you wish to sell your tower back to the bank?`\
  217. @do `v01 is 1
  218. @do write
  219. `x`x
  220. @choice
  221. Yes
  222. Not on your life.
  223.  @if responce is 2 then do
  224.    @begin
  225.     @show
  226. `\`\  `2You decide to keep your domain - for now.`\`\`k
  227.     @do goto startg
  228.    @end
  229.  
  230.   @do delete castle3.dat
  231.   @do money + 20000
  232.   @show
  233. `\`\  `%TOWER SOLD!`2`\`\`k
  234.     @do addlog
  235.   `0`n`2 has sold `%Wizard Tower`2 back to the bank!
  236.     @routine seperate in gametxt.ref
  237.     @do goto done
  238.     @end
  239.  
  240.  
  241.   @do goto startg
  242.  @end
  243.  
  244. @if responce is 1 then do
  245.   @begin
  246.   @do write
  247. `\`\  `0"And the new password, s&sir?" `2(enter `4NONE`2 for no access to anyone)`\  `2Password:`x
  248.   @do readstring 40 `s01 `s01 
  249.   @do `p20 is length `s01
  250.   @if `p20 < 2 then do
  251.    @begin
  252.    @show
  253. `\`\  `2You decide the current password is ok.`\`\`k
  254.    @do goto startg
  255.    @end
  256.   @do delete castle3.dat
  257.   @writefile castle3.dat
  258. &playernum
  259. `s01
  260. 0
  261. 0
  262. 0
  263. 0
  264. @show
  265. `\`\  `0"Yes s&sir, I will not forget it!" `2the troll promises.`\`\`k
  266.    @do goto startg
  267.   @end
  268.  
  269. @drawmap
  270. @update
  271.  
  272. @#sign
  273. @do moveback
  274.  
  275.  @if castle3.dat exist false then do
  276.  @begin
  277.  @do saybar
  278. Wizard Tower - For sale cheap, enquire inside.
  279.  @end 
  280.  
  281. @if castle3.dat exist true then do
  282.  @begin
  283. @readfile castle3.dat
  284. `p20
  285. `s01
  286. @
  287. @do `s01 is getname `p20
  288.  @do saybar
  289. `2Property of `0`s01`2.
  290.  @end 
  291.  
  292. @#enter
  293. @do moveback
  294. @offmap
  295. @if castle3.dat exist false then do
  296.   @begin
  297.   @show
  298. `r0`c  `r1 `%For Sale `r0
  299.  
  300.   `2Wizard Tower may be old and dalapidated but it still houses that old 
  301.   world charm of an enchanters hostel.  Perhaps if you buy it, people would
  302.   call you 'that crazy old wizard who lives in that tower!'.  You just
  303.   can't put a price on that. (ok, it's `$$40,000`2)
  304.  
  305.   Buy now and recieve the following bonuses:
  306.  
  307.   `0* `2An indoor fountain.
  308.  
  309.   `0* `2A magic <maybe> wand the previous owner left.
  310.  
  311.   `0* `2Some strange rocks upstairs.
  312.  
  313. @do `v01 is 1
  314. @do write
  315. `x`x
  316. @choice
  317. >&money 39999 Purchase it.
  318. <&money 40000 Sigh wistfully and leave since you don't have enough.
  319. >&money 39999 Leave.
  320. @
  321.  
  322. @if responce is 1 then do
  323.   @begin
  324.   @if castle3.dat exist true then do
  325.     @begin
  326.     @show
  327. `\`\  `2Oh crap!  Someone bought it while you were thinking about it.  You
  328.   will regret your snail like thinking for the rest of your days.`\`\`k
  329.     @do goto done
  330.     @end
  331.  
  332.   @writefile castle3.dat
  333. &playernum
  334. NONE
  335. 0
  336. 0
  337. 0
  338. 0
  339.     @do money - 40000
  340.     @do addlog
  341.   `0`n `2buys `%Wizard Tower`2!
  342.      @routine seperate in gametxt.ref
  343.  
  344.   @show
  345. `r0`c  `r1 `%Why hello there, landowner! `r0
  346. `\`2  Nice job!  You now own this tower!
  347.  
  348.   `2Enjoy your new home.`\`\`k
  349.   @end
  350.  
  351. @label done
  352. @drawmap
  353. @update
  354. @closescript
  355.   @end
  356.  
  357. @readfile castle3.dat
  358. `p20
  359. `s01
  360. @
  361.  
  362. @do `p21 is deleted `p20
  363.  
  364. @if `p21 is 1 then do
  365.   @begin
  366.    ;owner got deleted!!!  Lets put it up for sale again.
  367.    @do delete castle3.dat
  368.     @do addlog
  369.   `%Wizard Tower`2 is put on the market today.
  370.      @routine seperate in gametxt.ref
  371.  
  372.    ;run script again
  373.    @do goto enter
  374.   @end
  375.  
  376. @if `p20 not &playernum then do
  377.   @begin
  378.   @do `s02 is getname `p20
  379.   @do upcase `s01
  380.   @if `s01 is NONE then do
  381.    @begin
  382.    @show
  383. `r0`c  `r1 None shall pass `r0
  384.  
  385.   `2You pound on the door for some time before you get an answer.
  386.  
  387.   `0"Master `s02`0 has declared that `4NO`0 visitors shall be allowed!" `2a
  388.   trollish voice calls from behind the wall.
  389.  
  390.   `4Ouch!
  391.  
  392. `k
  393.    @do goto done
  394.    @end
  395.  
  396.   @show
  397. `r0`c  `r1 Stand and unfold thyself `r0
  398.  
  399. `2  A head pops over the gate.  `0"Halt, you!  What business have you with
  400.   my lord and master, `%`s02`0?" `2a hunched over troll asks.
  401.  
  402. @do write
  403. `x`x
  404. @do `v01 is 1
  405. @choice
  406. Offer an explanation.
  407. Visit later.
  408.   @if response is 1 then do
  409.    @begin
  410.    @do write
  411. `\`\  `2Say what? :`x
  412.   @do readstring 40 NIL `s03 
  413.   @do upcase `s03
  414.   @do upcase `s01
  415.  
  416.   @if `s03 is `s01 then do
  417.     @begin
  418.     @show
  419. `\`\  `0"Welcome to `%Wizard Tower`0,"`2 the troll smiles as he opens the gate.`\`\`k
  420.     @do goto letmein
  421.     @end
  422.    @writefile mail\mail`p20.dat
  423.   `0Wizard Tower Reports:
  424. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  425. `0  `n`2 attempted to sweet talk the troll by saying
  426.   `0"`s03"`2.  `2He was `bNOT`2 allowed in.
  427.  
  428.    @show
  429. `\`\  `2The troll doesn't look too interested.`\`\`k
  430.    @do goto done
  431.    @end
  432.  
  433.   @do goto done
  434.  
  435.   @end
  436.  
  437. ;let him in
  438. @label letmein
  439. @do x is 44
  440. @do y is 17
  441. @do map is 1175
  442. @loadmap 1175
  443. @do goto done
  444. @#done
  445.